Skip Headers

Oracle® Database Backup and Recovery Advanced User's Guide 10g Release 2 (10.2) Part Number B14191-02 |
Home | Book List | Contents | Index | Master Index | Feedback

Previous | Next
| View PDF

# Duplexing Backup Sets

RMAN can make up to four copies of a backup set simultaneously, each an exact duplicate of the others. A copy of a backup set is a copy of each backup piece in the backup set, with each copy getting a unique copy number (for example, `0tcm8u2s_1_1` and `0tcm8u2s_1_2`).

In most cases, the easiest method of duplexing backup sets is to use `BACKUP...` `COPIES` or `CONFIGURE` `...` `BACKUP` `COPIES` to duplex backup sets. For `DISK` channels, specify multiple values in the `FORMAT` option to direct the multiple copies to different physical disks. For `sbt` channels, if you use a media manager that supports Version 2 of the SBT API, then the media manager will automatically put each copy onto a separate medium (for example, a separate tape).

Note that it is not possible to duplex backup sets to the flash recovery area, and that duplexing only applies to backup sets, not image copies. It is an error to specify the `BACKUP... COPIES` when creating image copy backups, and the `CONFIGURE... BACKUP COPIES` setting is ignored for image copy backups.

## Duplexing Backup Sets with CONFIGURE BACKUP COPIES

The `CONFIGURE` `...` `BACKUP` `COPIES` command specifies the number of identical backup sets that you want to create on the specified device type. This setting applies to all backups except control file autobackups (because the autobackup of a control file always produces one copy) and backup sets when backed up with the `BACKUP BACKUPSET` command. You must have automatic channels configured.

To duplex a backup with CONFIGURE BACKUP COPIES:

1. Configure the number of copies on the desired device type for datafiles and archived redo logs on the desired device types. This example configures duplexing for datafiles and archived logs on tape as well as duplexing for datafiles (but not archived logs) on disk:

       RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 1;
       RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;
       RMAN> CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/save1/%U', '/save2/%U';
       RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE sbt TO 2;
       RMAN> CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE sbt TO 2;
       RMAN> CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 2;

2. Execute the `BACKUP` command. The following command backs up the database and archived logs to tape, making two copies of each datafile and archived redo log:

       RMAN> BACKUP DATABASE PLUS ARCHIVELOG; # uses default sbt channel

   Because of the configured formats for the disk channel, the following command backs up the database to disk, placing one copy of the backupsets produced in the `/save1` directory and the other in the `/save2` directory:

       RMAN> BACKUP DEVICE TYPE DISK AS COPY DATABASE;

3. Issue a `LIST` `BACKUP` command to see a listing of backup sets and pieces. For example, enter:

       RMAN> LIST BACKUP SUMMARY;

   The `#Copies` column shows the number of backupsets, which may have been produced by duplexing or by multiple backup commands.

## Duplexing Backupsets with BACKUP... COPIES

The `COPIES` option of the `BACKUP` command overrides every other `COPIES` or `DUPLEX` setting to control duplexing of backupsets.

To duplex a backup with BACKUP COPIES:

1. Specify the number of identical copies with the `COPIES` option of the `BACKUP` command. For example, run the following to make three copies of each backup set in the default `DISK` location:

       RMAN> BACKUP AS BACKUPSET DEVICE TYPE DISK
         COPIES 3
         INCREMENTAL LEVEL 0
         DATABASE;

   Because you specified `COPIES` on the `BACKUP` command, RMAN makes three backupsets of each datafile regardless of the `CONFIGURE` `DATAFILE` `COPIES` setting.

2. Issue a `LIST` `BACKUP` command to see a listing of backup sets and pieces (the `#Copies` column shows the number of copies, which may have been produced through duplexing or through multiple invocations of the `BACKUP` command). For example, enter:

       RMAN> LIST BACKUP SUMMARY;